package com.codemart.lanze.modules.cms.service.impl;

import com.codemart.lanze.modules.cms.entity.Article;
import com.codemart.lanze.modules.cms.mapper.ArticleMapper;
import com.codemart.lanze.modules.cms.service.IArticleService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 文章
 * @Author: lanze
 * @Date:   2019-09-13
 * @Version: V1.0
 */
@Service
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements IArticleService {

	public Article findByName(String name) {
		QueryWrapper<Article> ew = new QueryWrapper<>();
		ew.eq("name", name);
		return this.getOne(ew);
	}

}
